package com.bdcom.comp;

import java.awt.Dimension;
import java.awt.FlowLayout;

import javax.swing.JLabel;
import javax.swing.JPanel;

import org.springframework.stereotype.Component;

import com.bdcom.util.PlannerUtil;
/**
 * 状态栏
 * @author Administrator
 *
 */
@Component
public class InfoBarPanel extends JPanel{

	private static final long serialVersionUID = 1L;
	
	private JLabel projectNameLabel;

	private JLabel infoLabel = null;
	
	public InfoBarPanel() {
		super();
		// TODO Auto-generated constructor stub

		this.setLayout(new FlowLayout(FlowLayout.CENTER));
		
		projectNameLabel =new JLabel();
		
		this.add(projectNameLabel);
		
		infoLabel = new JLabel(PlannerUtil.getString("welcome"));
		
		this.add(infoLabel);
		
		this.setPreferredSize(new Dimension(0,20));
	}

	public void setInfo(String info ){
		
		infoLabel.setText(PlannerUtil.getString(info));
		
	}
	
	public void setProjectName(String name){
		
		projectNameLabel.setText(PlannerUtil.getString("projectName")+":"+name+"  ");
		
	}
	
	
}
